<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
	<link rel="stylesheet" href="../css/login.css" />
	
	<script type="text/javascript" src="../js/md5.js"></script>
	
</head>
<body>

	<%
			String account="";
			String pwd="";
			Cookie[] cookies=request.getCookies();
				
				if(cookies!=null&&cookies.length>0){
					
					for(Cookie c:cookies){
						
						if(c.getName().equals("accountCookie")){
							
							account=c.getValue();
							
						}
						if(c.getName().equals("pwdCookie")){
							pwd=c.getValue();
						}
						
					}
					
				}
	
	
	
	%>
	

	<div id="login">
			
			<div id="account" class="login_mode">账号登陆</div>
			<div id="phone" class="login_mode">手机登陆</div>
			<div id="login_mode_account">
				<form id="form1" action="/J54Books/accountLongin" method="post" autocomplete="off">
					用户名:<input type="text" name="account" value="<%=account%>">
							<br />
					密&nbsp;码:<input type="password" name="pwd" value="<%=pwd%>">
							<br>
					<input type="checkbox" name="avoidlanding">是否10天免登陆	
						<br>								
							<input type="button" value="提交" id="btn01">
				</form>
				<a href="../jsp/register.jsp">账号注册 </a>
			</div>
			<div id="login_mode_phone">
				<form id="form2" action="/J54Books/phoneLongin" method="post">
					手机号:<input type="text" name="phone">
							<br />
					验证码:<input id="code" type="text" name="code"><input type="button" value="发送验证码" id="btn02" />
							<br>							
							<input type="button" value="提交" id="btn03" />
				</form>
				<a href="../jsp/register.jsp">账号注册 </a>
			</div>
		</div>
		<script type="text/javascript" src="../js/login.js" charset="UTF-8">
			
		</script>
		<script type="text/javascript">
		
			<%if(!("".equals(account))&&!("".equals(pwd))){ %>
			
			window.location.href="/J54Books/accountLongin?account=<%=account%>&pwd=<%=pwd%>";
	
			<%}%>
		</script>
</body>
</html>